<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../../common/include.inc.jsp"%>
<h2 class="contentTitle">添加用户</h2>


<div class="pageContent">
	
	<form method="post" action="admin/user/toAddUser" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone)">
		<div class="pageFormContent nowrap" layoutH="150">

			<dl>
				<dt>用户名：</dt>
				<dd>
					<input type="text" name="userName" maxlength="20" class="required alphanumeric" />
				</dd>
			</dl>
			<dl>
				<dt>密码：</dt>
				<dd>
					<input id="w_validation_pwd" type="password" name="password" class="required alphanumeric" minlength="6" maxlength="20" alt="字母、数字、下划线 6-20位"/>
				</dd>
			</dl>
			<dl>
				<dt>确认密码：</dt>
				<dd>
					<input type="password" name="repassword" class="required" equalto="#w_validation_pwd"/>
				</dd>
			</dl>
			<dl>
				<dt>昵称：</dt>
				<dd>
					<input type="text" name="nickName" class="required"/>
				</dd>
			</dl>
			<dl>
				<dt>邮箱：</dt>
				<dd>
					<input type="text" name="email" class="required email" alt="请输入您的电子邮件"/>
				</dd>
			</dl>
			<dl>
				<dt>电话：</dt>
				<dd>
					<input type="text" name="phone" class="phone" class="digits" alt="请输入您的电话"/>
				</dd>
			</dl>
			
			<dl>
				<dt>角色：</dt>
				<dd>
					<select name="roleId" class="required" width="30">
						<option value="">未选择</option>
						<c:forEach var="role" items="${roleList}">
							<option value="${role.roleId}" <c:if test="${role.roleId ==page.condition.roleId }">selected</c:if>>${role.description}</option>
						</c:forEach>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>年龄：</dt>
				<dd>
					<input type="text" name="age" class="digits" />
				</dd>
			</dl>
			<dl>
				<dt>性别：</dt>
				<dd>
					<select name="sex" class="required" width="30">
							<option value="">未选择</option>
							<option value="男">男</option>
							<option value="女">女</option>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>是否启用：</dt>
				<dd>
					<select name="activated"  width="30" class="required">
							<option value="">未选择</option>
							<option value="1">启用</option>
							<option value="0">禁用</option>
						</select>
				</dd>
			</dl>
			
			
		<!-- 	<div class="divider"></div> -->
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>


<script type="text/javascript">
function customvalidXxx(element){
	if ($(element).val() == "xxx") return false;
	return true;
}
</script>
